home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 734 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.1 KB

  1. Path: newshost.williams.edu!not-for-mail
  2. From: 96kfd@williams.edu (der tanzende Tigger)
  3. Newsgroups: comp.lang.c++
  4. Subject: tracing "new" memory problems
  5. Date: 6 Jan 1996 13:41:46 -0500
  6. Organization: Williams College, Williamstown MA
  7. Message-ID: <4cmfpaINN3hb@bigbird.cc.williams.edu>
  8. NNTP-Posting-Host: bigbird.cc.williams.edu
  9.  
  10. I am writing an application that uses new and delete extensively, and
  11. it is very brittle: small changes (one more line read from a file in
  12. one place) cause large memory errors (a routine that read 120 lines
  13. from another file crashes on the sixth with "out of virtual memory in
  14. new"). In each case, an object is created when a line is read, and the
  15. memory is allocated using new.
  16.  
  17. The problem is that my debugger (gdb) will not give me any more
  18. information than "exited with error"--no backtrace, no indication
  19. where the error occurred. The application was compiled with gcc 2.7.2
  20. on a Sun Sparc with SunOS 4.1.3_U1 and libg++. Is there any way to
  21. trace memory allocation in an application that crashes like this?
  22.  
  23. Incidentally: my IPX has 16 mb of memory and 40 mb of virtual memory.
  24.  
  25. --kd
  26.  
  27.  
  28.